From: Kenichi Handa Date: Tue, 27 Aug 2002 00:59:55 +0000 (+0000) Subject: (get_next_display_element): In unibyte case, don't use X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~31008 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=57db740a8f7a090818a5d5415771c85b4d1f532f;p=emacs.git (get_next_display_element): In unibyte case, don't use octal form for such eight-bit characters that can be converted to multibyte char. --- diff --git a/src/xdisp.c b/src/xdisp.c index 6387d6d341f..21fbdaca0d9 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -4258,14 +4258,22 @@ get_next_display_element (it) the translation. This could easily be changed but I don't believe that it is worth doing. - Non-printable multibyte characters are also translated - octal form. */ - else if ((it->c < ' ' + If it->multibyte_p is nonzero, eight-bit characters and + non-printable multibyte characters are also translated to + octal form. + + If it->multibyte_p is zero, eight-bit characters that + don't have corresponding multibyte char code are also + translated to octal form. */ + else if (((it->c < ' ' || it->c == 127) && (it->area != TEXT_AREA || (it->c != '\n' && it->c != '\t'))) - || (it->c >= 127 - && it->len == 1) - || !CHAR_PRINTABLE_P (it->c)) + || (it->multibyte_p + ? ((it->c >= 127 + && it->len == 1) + || !CHAR_PRINTABLE_P (it->c)) + : (it->c >= 128 + && it->c == unibyte_char_to_multibyte (it->c)))) { /* IT->c is a control character which must be displayed either as '\003' or as `^C' where the '\\' and '^'